<!--
 * @Description: 
 * @Author: charles
 * @Date: 2021-05-05 22:02:56
 * @LastEditors: wupy
 * @LastEditTime: 2022-01-09 11:39:14
-->
<template>
  <!--1. 容器 -->
  <div ref="bottom1_container" id="containerb3" style="height: 95%"></div>
</template>

<script>
import { Line } from '@antv/g2plot';
export default {
  data(){
    return{
      data:[]
    }
  },
  mounted(){
    this.initChart()

  },
  methods:{
 
    initChart(){
      fetch('https://gw.alipayobjects.com/os/bmw-prod/1d565782-dde4-4bb6-8946-ea6a38ccf184.json')
  .then((res) => res.json())
  .then((data) => {
      const line = new Line('containerb3', {
      data,
      padding: 'auto',
      xField: 'Date',
      yField: 'scales',
      xAxis: {
        // type: 'timeCat',
        tickCount: 5,
      },
      smooth: true,
    });

    line.render();
   });

    }
  }
}
</script>

<style scoped>

</style>